<html>
<head>
    <title>移动端轻量级图片Ajax上传预览</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0,viewport-fit=cover">
    <link rel="stylesheet" href="./css/weui.css">
</head>
<body>
    <form id="classdynamics_form" action="javascript:void(0);"  class="form_post" method="post"  enctype="multipart/form-data">
        <div class="weui-cells__title">图片</div>
        <div class="weui-gallery" id="gallery">
            <span class="weui-gallery__img" id="galleryImg"></span>
            <div class="weui-gallery__opr">
                <a href="javascript:" rel="external nofollow" class="weui-gallery__del">
                    <i class="weui-icon-delete weui-icon_gallery-delete"></i>
                </a>
            </div>
        </div>
     
        <input type="hidden" name="user_data" value="{$user_data.user_id}">
        <input type="hidden" name="school_id" value="{$school_id}">
     
        <div class="weui-cells weui-cells_form">
            <div class="weui-cell">
                <div class="weui-cell__bd">
                    <div class="weui-uploader">
                        <div class="weui-uploader__bd">
                            <ul class="weui-uploader__files" id="uploaderFiles">
                            </ul>
                            <div class="weui-uploader__input-box">
                                <input id="uploaderInput" class="weui-uploader__input zjxfjs_file" type="file" accept="image/*" multiple="" name="pic[]" />
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="weui-btn-area">
            <a class="weui-btn weui-btn_primary" href="javascript:" id="showTooltips">保存</a>
        </div>
    </form>

    <script type="text/javascript" src="./js/jquery-3.4.1.min.js" ></script>
    <script type="text/javascript" src="./js/upload.js" ></script>
</body>
</html>